﻿using System;
using Utils;

namespace SMAPlugin.Common
{
	[Serializable]
	internal class StrategyControlData : Plugins.Base.Common.StrategyControlDataBase, ICloneable<StrategyControlData>
	{
		#region Attributes

		private int _slowSMAPeriod;
		private int _fastSMAPeriod;
		private int _volume;
		private WorkingMode _workingMode;
		private decimal _fixedWin;

		#endregion

		#region Properties

		public int SlowSMAPeriod
		{
			get
			{
				return _slowSMAPeriod;
			}
			set
			{
				if (_slowSMAPeriod != value)
				{
					_slowSMAPeriod = value;
					base.OnPropertyChanged("SlowSMAPeriod");
				}
			}
		}

		public int FastSMAPeriod
		{
			get
			{
				return _fastSMAPeriod;
			}
			set
			{
				if (_fastSMAPeriod != value)
				{
					_fastSMAPeriod = value;
					base.OnPropertyChanged("FastSMAPeriod");
				}
			}
		}

		public int Volume
		{
			get
			{
				return _volume;
			}
			set
			{
				if (_volume != value)
				{
					_volume = value;
					base.OnPropertyChanged("Volume");
				}
			}
		}

		public WorkingMode WorkingMode
		{
			get
			{
				return _workingMode;
			}
			set
			{
				if (_workingMode != value)
				{
					_workingMode = value;
					base.OnPropertyChanged("EntryMode");
				}
			}
		}

		public decimal FixedWin
		{
			get
			{
				return _fixedWin;
			}
			set
			{
				if (_fixedWin != value)
				{
					_fixedWin = value;
					base.OnPropertyChanged("FixedWin");
				}
			}
		}

		#endregion

		#region ICopiable

		public StrategyControlData Clone()
		{
			return (StrategyControlData)this.MemberwiseClone();
		}

		public void Copy(StrategyControlData source)
		{
			base.Copy(source);
		}

		#endregion
	}
}
